﻿using PowerHub.MES.DTO.Crew.QueryDto;
using PowerHub.MES.DTO.Production.QueryDTO;
using PowerHub.MES.Entities.Crew;
using PowerHub.MES.Entities.Production;
using PowerHub.MES.ReturnEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PowerHub.MES.IRepository.IProduction
{

    /// <summary>
    ///生产任务数据接口层
    /// </summary>
    public interface IProduction_ProductionTaskRepository
    {
        /// <summary>
        /// 获取生产任务列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public Task<OperationPageResult<List<Production_ProductionTask>>> GetProduction_ProductionTaskPageListAsync(QueryProduction_ProductionTaskDTO query);

        /// <summary>
        /// 添加生产任务
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public Task<OperationResult<bool>> CreateProduction_ProductionTaskAsync(List<Production_ProductionTask> query);

        /// <summary>
        /// 批量删除生产任务
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public Task<OperationResult<bool>> DeletionProduction_ProductionTaskAsync(List<string>? ids);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public Task<OperationResult<bool>> UpdateProduction_ProductionTaskAsync(Production_ProductionTask query);

        /// <summary>
        /// 获取工单BOM信息
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public Task<Production_BillOfMaterials> GetProduction_BillOfMaterialsByIdAsync(string id);

        /// <summary>
        /// 根据计划明细id添加生产任务（单）
        /// </summary>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public Task<OperationResult<bool>> CreateProduction_ProductionTaskBySchedulingPlanDetialIdAsync(bool isUpdate, Production_ProductionTask production_ProductionTask, Crew_SchedulingPlanDetial schedulingPlanDetial, Production_BillOfMaterials billOfMaterials);
    }
}
